﻿$(document).ready(function () {

    $("#ftHolder").jqFancyTransitions({
        navigation: true,
        links: true,       
        width: 600, 
        height: 340,
        direction: 'random'
    });

    $("#donationYear").change(function () {
        var url = $("#donorsList").attr("data-url");
        var year = $("#donationYear").val();

        var request = $.ajax({

            url: url,

            type: "GET",

            data: { year: year },

            dataType: "json"

        });

        request.done(function (msg) {

            $("#donorsList").html(msg);

        });

        request.fail(function (jqXHR, textStatus) {

            alert("Request failed: " + textStatus);

        });
    });

});

